#!./common/bats/bin/bats
# -*-sh-*-

load ./common/test_helper_functions || exit 1
source ./common/functions || exit 1

if [ -s ./TEST_ENV ];then
    source ./TEST_ENV
fi

check_rms
rm=$RESOURCE_MANAGER
testname="libs/ADIOS"

NODES=2
TASKS=8

@test "[$testname] MPI C binary runs under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    binary=arrays_write
    if [ ! -x $binary ];then
	flunk "$binary binary does not exit"
    fi

    run_mpi_binary ./${binary} "" $NODES $TASKS 
    assert_success
}

@test "[$testname] MPI F90 binary runs under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    binary=scalars_write
    if [ ! -x $binary ];then
	flunk "$binary binary does not exit"
    fi

    run_mpi_binary ./${binary} "" $NODES $TASKS
    assert_success
}



